
package com.test.ddaidai.main_account_plain;

import java.util.ArrayList;

import com.test.ddaidai_android.activity.R;

import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TableLayout;
import android.widget.TableRow;
import android.widget.TextView;

public class TabActivity4 extends Activity {

	TableLayout t;
    TableRow row;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_tab4);
		t = (TableLayout) findViewById(R.id.t);
        t.setStretchAllColumns(true);
        int z[] = {2};
        ArrayList<View> v = new ArrayList<View>();
        for (int x = 0; x < 3; x++) {
            row = new TableRow(this);
            row.setBackgroundColor(Color.rgb(222, 220, 210));
            for (int i = 0; i < 2; i++) {
                TextView t1 = new TextView(this);
                t1.setBackgroundResource(R.drawable.tab_shappe);
                t1.setText("表格"+x+i);
                t1.setTextColor(Color.BLACK);
                row.addView(t1);
            }
            t.addView(row,new TableLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,
            		ViewGroup.LayoutParams.WRAP_CONTENT));
        }
	}
	
}
